package Homes;

import java.util.ArrayList;

import org.uqbar.commons.utils.Home;

import Categorias.Categoria;

public class CategoriasHome extends Home<Categoria> {
	
	private static CategoriasHome instance = null;
	
	private CategoriasHome(){
		super(Categoria.class);
	}
	
	public static void reset(){
		instance = null;
	}
	
	public static synchronized CategoriasHome getInstance(){
		if (instance == null)
			instance = new CategoriasHome();
		return instance;
	}
	
	public void addCategoria(Categoria categoria){
		super.add(categoria);
	}
	
	public ArrayList<Categoria> getAll(){
		return (ArrayList<Categoria>) super.getObjects();
	}
}
